﻿@model IRIS.Models.ContentViewModel

@{
    ViewBag.Title = "Index";
}

<!-- Here above is the group categories that are on the menubar. Have to modify the css to change location -->
<span id ="Flokkar">Flokkar:</span>

@foreach (var Articles in Model.m_Categories)  
{ 
    <span>@Articles.Name - </span>
        
}
<!--Here comes all the articles and information related to them -->
<ul>

@foreach (var Categories in Model.m_Articles)
{ 
    <div id="grein">
        <h2>@Categories.ContentTitle</h2>
        <div id="Author">Höfundur: @Categories.Author </div>
        <div id="ArticleCategory"> Flokkur: @Categories.ContentCategory.Name</div>
        <p>
        @{ 
        var segment = Categories.ContentText;                              
        } 
        @Html.Raw(segment)   
        </p>
    </div>
}

</ul>


